package com.feicheng.persistence.mapper;

import com.feicheng.persistence.entity.AVipType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author cailongyang
 * @since 2025-02-11
 */
@Mapper
public interface AVipTypeMapper extends BaseMapper<AVipType> {
    // 获取所有会员类型
    @Select("SELECT * FROM a_vip_type")
    List<AVipType> getAllAVipTypes();

    // 根据会员类型ID查找会员类型
    @Select("SELECT * FROM a_vip_type WHERE viptypeid = #{viptypeid}")
    AVipType getAVipTypeById(String viptypeid);

    // 添加会员类型
    void insertAVipType(AVipType aVipType);

    // 更新会员类型
    void updateAVipType(AVipType aVipType);

    // 删除会员类型
    void deleteAVipType(String viptypeid);
}
